package test.h0814;

import java.util.Scanner;

public class Main3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        String s=in.nextLine();
        int ans=0;
        for (int i = s.length()-1; i >=0; i--) {
            if (s.charAt(i)==' '){
                break;
            }else ans++;
        }
        System.out.println(ans);
    }
}
